/*
* @Author: Xu Liu  email:2867557054@qq.com web:http://www.jameson512.com
* @Date:   2017-05-11 09:55:18
* @Last Modified by:   Xu Liu
* @Last Modified time: 2017-05-11 10:28:01
*/

'use strict';
function autoheight(){
		if(document.querySelector && document.querySelector(".floattopempty") && document.querySelector(".itemtitle")){
			var itemh = (document.querySelector(".itemtitle").offsetHeight-30);
			var iscate = /contrl=mcategory/.test(location.search);
			if(itemh || iscate){
				if(iscate){
					itemh -= 18;
				}
				document.querySelector(".floattopempty").style.marginTop = itemh+'px';
			}
		}
	}
_attachEvent(window,'load',autoheight);